package com.sky.myapplication.kotlin.kotlinAdapter

import android.os.Parcel
import android.os.Parcelable
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
import androidx.fragment.app.FragmentPagerAdapter

/**
 * Created by Min
 * Time 2022/10/19
 * Desc
 */
class FragmentAdapter(fm: FragmentManager) : FragmentPagerAdapter(fm) {
    private lateinit var list : ArrayList<Fragment>

    fun setList(list : ArrayList<Fragment>){
        this.list = list
    }

    override fun getCount(): Int {
        return list.size
    }

    override fun getItem(position: Int): Fragment {
        return list.get(position)
    }
}